feat: add contract stream expiry and reclaim - #914
Conversation
|
@kosisochukwu1234 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@kosisochukwu1234 is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #682
Resolves stream expiry issue by introducing a configurable grace period and reclaim mechanism for senders.
Changes Included:
set_grace_periodandget_grace_periodadmin functions, utilizingDataKey::GracePeriod(defaulting to 30 days).check_and_expireinternal helper that enforces auto-expiry once the stream passes its end time plus the grace period.StreamExpiredevent is now automatically emitted the first time an expired stream is queried or interacted with (e.g., viaclaimable,get_stream, orclaim).reclaim_expiredfor the sender to withdraw the unclaimed vested balance after the grace period ends. The recipient retains their ability to claim their vested amount during the grace period, but is blocked after expiry.